import { fetch } from 'app/middleware/axios'


export default{
  //首页数据
  indexData() {
    return fetch(`/v1/home/wechant/main`,'post')
  },
  //直投项目列表
  //https://www.51anxintou.com/api/loan/list
  directList(page,size) {
    return fetch(`/loan/list`,'post',{page:page,size:size})
  },
  //债权转让列表
  //https://www.51anxintou.com/api/loan/credit/list
  assignmentList(page,size) {
    return fetch(`/loan/credit/list`,'post',{page:page,size:size})
  },
  //直投项目详情
  //https://test.51anxintou.com/api/loan/profile/new
  directListDetail(id) {
    return fetch(`/loan/profile/new`,'post',{loanId:id})
  },
  //直投项目详情投资记录列表
  //https://www.51anxintou.com/api/loan/investrecord
  investrecord(id,opt) {
    return fetch(`/loan/investrecord`,'post',{loanId:id, page: opt.page, pageSize: opt.pageSize})
  },
}



// function getSceneInfo (id) {
//   return axios({
//     url: '/api/getSceneInfo',
//     params: {
//       sceneId: id
//     }
//   })
//     .then(res => {
//       return res
//     })
//     .catch(err => {
//       return err
//     })
// }

// function proxyWeather () {
//   return axios({
//     url: '/weather'
//   })
//     .then(res => {
//       return res
//     })
//     .catch(err => {
//       return err
//     })
// }


//  export { getSceneInfo, proxyWeather }
